<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>函数扩展</title>
</head>
<body>
<script>
// ES6之前的做法
function arrPush(arr,x,y,z) {
    var arr = arguments[0];
    for(var i  = 1;i<arguments.length;i++){
        arr.push(arguments[i]);
    }
}
var arr1 = [1,2,3];
arrPush(arr1,'a','b','c');
console.log(arr1)    
</script>
</body>
</html>